echo 'starting master1-stave2...'
docker-compose -f master1-stave2.yaml up -d

sleep 15

if [ ! -f conf/sentinel1.conf ]; then
    echo 'copy new confs...'
    cp conf/sentinel.conf conf/sentinel1.conf
    cp conf/sentinel.conf conf/sentinel2.conf
    cp conf/sentinel.conf conf/sentinel3.conf
fi

echo 'starting sentinel3...'
docker-compose -f sentinel3.yaml up -d